package com.choupin.choupin.entity;

import java.util.Objects;

public class Paging {
   private Integer currentPage;//当前页数
   private Integer pageSize;//每一页的条数
   private Object data;//数据

    public Paging() {
    }

    public Paging(Integer currentPage, Integer pageSize, Object data) {
        this.currentPage = currentPage;
        this.pageSize = pageSize;
        this.data = data;
    }

    public Integer getCurrentPage() {
        return currentPage;
    }

    public void setCurrentPage(Integer currentPage) {
        this.currentPage = currentPage;
    }

    public Integer getPageSize() {
        return pageSize;
    }

    public void setPageSize(Integer pageSize) {
        this.pageSize = pageSize;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Paging paging = (Paging) o;
        return Objects.equals(currentPage, paging.currentPage) &&
                Objects.equals(pageSize, paging.pageSize) &&
                Objects.equals(data, paging.data);
    }

    @Override
    public int hashCode() {
        return Objects.hash(currentPage, pageSize, data);
    }

    @Override
    public String toString() {
        return "Paging{" +
                "currentPage=" + currentPage +
                ", pageSize=" + pageSize +
                ", data=" + data +
                '}';
    }
}
